<?php
require_once("common.inc.php");

$Id = $_GET["Id"];
$sql = " SELECT * FROM `article` WHERE Id = $Id";
$conn = new mysqli("localhost","root","","myblog");
$rs = $conn->query($sql);
if($conn->error) die($conn->error);
$detail = $rs->fetch_assoc();
?>

<?php require_once("header.inc.php");?>

<div class="dataset detail">
    <div class="field Title">
        <label>
            文章标题
        </label>
        <span class="input"><?php echo $detail["Title"]?></span>
    </div>
    <div class="field Content">
        <label>
            内容
        </label>
        <span class="input"><?php echo str_replace("\n","<br />",$detail["Content"])?></span>
    </div>
   <div class="info">
        <?=$detail["AuthorName"]?>编辑于
        <?=$detail["UpdateTime"]?>
   </div>
   <div class="actions">
       <a href="article_list_new.php">返回列表</a>
   </div>
</div>     
<div class="replyArea">
    <form action="" method="post">
        <textarea name="replyContent"></textarea>
        <input type="submit" value="回复" />
    </form>
    <div>
        <div class="replyList">
            <div>
                <div>吐槽的内容</div>
                <div>曾钞</div>
                <div>2020</div>
            </div>
            <div>
                <div>吐槽的内容</div>
                <div>曾钞</div>
                <div>2020</div>
            </div>
        </div>
        <div class="replyListPage">1 2 3 4</div>
    </div>
</div>

<?php require_once("footer.inc.php");?>
